﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Bioinformatics.Types;

namespace Bioinformatics.UI
{
    public partial class AddSequenceForm : Form
    {
        public GeneticSequence ManualSequence { get; private set; }

        public AddSequenceForm()
        {
            InitializeComponent();
            ManualSequence = new GeneticSequence();
        }

        private void uxCloseForm_Click(object sender, EventArgs e)
        {
            ManualSequence.Caption = uxCaption.Text;
            ManualSequence.Name = uxScientificName.Text;
            ManualSequence.CommonName = uxCommonName.Text;
            ManualSequence.Description = uxDescription.Text;
            ManualSequence.Gi = uxGi.Text;
            ManualSequence.TaxonomyId = uxTaxonomyId.Text;
            ManualSequence.DatabaseId = uxDatabaseId.Text;
            ManualSequence.Sequence = uxSequence.Text;
            ManualSequence.Length = uxSequence.Text.Length;

            DialogResult = DialogResult.OK;
        }
    }
}
